package com.lantosec.hmrp.modules.eval.vo;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.lantosec.hmrp.modules.eval.entity.EvalScheme;
import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.eval.entity.EvalSchemeDetailed;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 考评方案 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-03-16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="EvalScheme对象", description="考评方案")
public class EvalSchemeVO extends BaseVO<EvalScheme> {
    private static final long serialVersionUID = 1L;


    public EvalSchemeVO(EvalScheme entity){
        this.evalSchemeId = entity.getEvalSchemeId();
        this.evalSchemeName = entity.getEvalSchemeName();
        this.ownerUserId = entity.getOwnerUserId();
        this.createUserId = entity.getCreateUserId();
        this.createUser = entity.getCreateUser();
        this.createTime = entity.getCreateTime();
        this.editorUserId = entity.getEditorUserId();
        this.editorUser = entity.getEditorUser();
        this.editorTime = entity.getEditorTime();
    }

    @Override
    public EvalScheme convertToEntity(){
        return new EvalScheme(this);
    }


    @ApiModelProperty(value = "考评方案ID")
    private Integer evalSchemeId;

    @ApiModelProperty(value = "考评方案名称")
    private String evalSchemeName;

    @ApiModelProperty(value = "拥有者ID,当为null时为公共方案,否则为私有")
    private String ownerUserId;

    @ApiModelProperty(value = "创建人ID")
    private String createUserId;

    @ApiModelProperty(value = "创建人")
    private String createUser;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "最后编辑人ID")
    private String editorUserId;

    @ApiModelProperty(value = "最后编辑人")
    private String editorUser;

    @ApiModelProperty(value = "最后编辑时间")
    private Date editorTime;

    private List<EvalSchemeDetailed> evalSchemeDetailedList;
}
